package com.tfy.liquor.service;

import com.tfy.liquor.bean.ProductOrder;
import com.tfy.liquor.bean.Result;
import com.tfy.liquor.bean.UserPurse;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public interface UserPurseService {
    /**
     * 创建钱包
     * @param userPurse
     * @return
     */
    Boolean createUserPurse(UserPurse userPurse);

    /**
     * 根据用户编号获取钱包信息
     * @param userId
     * @return
     */
    UserPurse getUserPurseByUserId(Long userId);

    /**
     * 修改钱包操作码
     * @param userPurse
     * @param oldOpCode
     * @return
     */
    Result editUserPurseOpCode(UserPurse userPurse, String oldOpCode);

    /**
     * 订单分润记录
     * @param productOrder
     * @return
     */
    Boolean orderEarnings(ProductOrder productOrder);
}
